/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package isd.inventario.web;

import isd.general.util.JsfUtil;
import isd.inventario.modelo.ST_Comprobante;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

/**
 *
 * @author Claudio
 */
@ManagedBean
@ViewScoped
public class ScrapMCI extends MovimientoInventarioBean {

    /** Creates a new instance of TransferenciaInventario */
    public ScrapMCI() {

    }

    @PostConstruct
    public void init(){

        try {

            System.out.println("Iniciando ScrapMCI");

            titulo = "Scrap MCI";
            modcom = "ST";
            codcom = "SC002";

            ST_Comprobante comprobante = comprobanteRN.getComprobante(modcom, codcom);
            m = inventarioRN.nuevoMovimiento(comprobante);

            //Valores por defecto
           

        } catch (Exception e){
//            e.printStackTrace();
           JsfUtil.addErrorMessage("Error al iniciar el bean " + e.getMessage());
        }
    }

    public void nuevo(){
        init();
    }

}
